package com.gsit.ocrbatch.domain;

import static com.gsit.ocrbatch.utils.FileConstant.FILE_PATH_SEPARATOR;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Component("webConfig")
public class WebConfig {
	
	@Value("${apacheWebIp}")
	private String apacheWebIp;
	
	@Value("${baseUrl}")
	private String baseUrl;
	
	@Value("${resourcesLocation}")
	private String resourcesLocation;
	
	@Value("${apacheFilePath}")
	private String apacheFilePath;
	
	@Value("${external.file.loader.enable}")
	private String externalFileLoaderEnable;
	
	@Value("${external.in.file.loaction}")
	private String externalInFileLoaction;
	

	public String getApacheWebIp() {
		return apacheWebIp;
	}

	public void setApacheWebIp(String apacheWebIp) {
		this.apacheWebIp = apacheWebIp;
	}

	public String getBaseUrl() {
		return baseUrl;
	}

	public void setBaseUrl(String baseUrl) {
		this.baseUrl = baseUrl;
	}

	public String getResourcesLocation() {
		return resourcesLocation;
	}

	public void setResourcesLocation(String resourcesLocation) {
		this.resourcesLocation = resourcesLocation;
	}

	public String getApacheFilePath() {
		return apacheFilePath;
	}

	public void setApacheFilePath(String apacheFilePath) {
		this.apacheFilePath = apacheFilePath;
	}

	
	public String getWebResourcesLocation() {
		StringBuffer location = new StringBuffer();
		location.append(this.getApacheWebIp());
		location.append(FILE_PATH_SEPARATOR);
		location.append(this.getResourcesLocation());
		location.append(FILE_PATH_SEPARATOR);
		return location.toString();
	}

	public Boolean getExternalFileLoaderEnable() {
		return new Boolean(externalFileLoaderEnable);
	}

	public void setExternalFileLoaderEnable(String externalFileLoaderEnable) {
		this.externalFileLoaderEnable = externalFileLoaderEnable;
	}

	public String getExternalInFileLoaction() {
		return externalInFileLoaction;
	}

	public void setExternalInFileLoaction(String externalInFileLoaction) {
		this.externalInFileLoaction = externalInFileLoaction;
	}
	

}
